/**
 *
 */
package com.ybkj.daijia.server.service.impl;


import com.ybkj.daijia.server.mapper.PayRecordMapper;
import com.ybkj.daijia.server.model.PayRecord;
import com.ybkj.daijia.server.service.PayRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author Shine
 *
 */
@Service
public class DefaultPayRecordService implements PayRecordService {

    @Autowired
    private PayRecordMapper payRecordMapper;


    @Transactional(rollbackFor = Exception.class)
    public PayRecord inertRecord(PayRecord payRecord) {

        payRecordMapper.insertRecord(payRecord);

        return payRecord;
    }


    @Override
    public PayRecord findByTradeNO(String out_trade_no) {

        return payRecordMapper.selectByTradeNO(out_trade_no);
    }


    @Override
    @Transactional(rollbackFor = Exception.class)
    public int updateByPrimaryKey(PayRecord payRecord) {

        return payRecordMapper.updateByPrimaryKey(payRecord);
    }


}